﻿/*******************************************************************************
 * AAEngine
 * Copyright (c) 2010 Mike Jarosch
 *
 * Original source PushButton Engine:
 * Copyright (C) 2009 PushButton Labs, LLC
 * For more information see http://www.pushbuttonengine.com
 *
 * This file is licensed under the terms of the MIT license, which is included
 * in the "MIT License.txt" file at the root directory of this SDK.
 ******************************************************************************/

namespace AAEngine.Engine.Core
{
    /// <summary>
    /// This interface should be implemented by objects that need to perform    
    /// actions every tick, such as moving, or processing collision. Performing    
    /// events every tick instead of every frame will give more consistent and    
    /// correct results. However, things related to rendering or animation should    
    /// happen every frame so the visual result appears smooth.
    /// </summary>
    /// <remarks>
    /// Along with implementing this interface, the object needs to be added    
    /// to the ProcessManager via the AddTickedObject method.
    /// </remarks>
    /// <seealso cref="ProcessManager"/>
    /// <seealso cref="IAnimatedObject"/>
    public interface ITickedObject
    {
        /// <summary>
        /// This method is called every tick by the ProcessManager on any objects       
        /// that have been added to it with the AddTickedObject method.
        /// </summary>
        /// <param name="deltaTime">The amount of time (in seconds) specified for a tick.</param>
        /// <seealso cref="ProcessManager.AddTickedObject(ITickedObject)"/>
        /// <seealso cref="ProcessManager.AddTickedObject(ITickedObject, float)"/>
        void OnTick(float deltaTime);

        //void OnUpdate(GameTime gameTime);
    }
}
